Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Editing Cones

QuickDraw 3D provides routines that you can use to create and manipulate cones. See "Cones" for the definition of a cone.

Q3Cone_New

You can use the Q3Cone_New function to create a new cone.

TQ3GeometryObject Q3Cone_New (const TQ3ConeData *coneData);
coneData
A pointer to a TQ3ConeData structure.

DESCRIPTION

The Q3Cone_New function returns, as its function result, a new cone having the shape and attributes specified by the coneData parameter. If a new cone could not be created, Q3Cone_New returns the value NULL .

Q3Cone_Submit

You can use the Q3Cone_Submit function to submit an immediate cone for drawing, picking, bounding, or writing.

TQ3Status Q3Cone_Submit (
                     const TQ3ConeData *coneData,
                     TQ3ViewObject view);
coneData
A pointer to a TQ3ConeData structure.
view
A view.

DESCRIPTION

The Q3Cone_Submit function submits for drawing, picking, bounding, or writing the immediate cone whose shape and attribute set are specified by the coneData parameter. The cone is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Cone_GetData

You can use the Q3Cone_GetData function to get the data that defines a cone and its attributes.

TQ3Status Q3Cone_GetData (TQ3GeometryObject cone, TQ3ConeData *coneData);
cone
A cone.
coneData
On exit, a pointer to a TQ3ConeData structure that contains information about the cone specified by the cone parameter.

DESCRIPTION

The Q3Cone_GetData function returns, through the coneData parameter, information about the cone specified by the cone parameter. QuickDraw 3D allocates memory for the TQ3ConeData structure internally; you must call Q3Cone_EmptyData to dispose of that memory.

Q3Cone_SetData

You can use the Q3Cone_SetData function to set the data that defines a cone and its attributes.

TQ3Status Q3Cone_SetData (
                     TQ3GeometryObject cone,
                     const TQ3ConeData *coneData);
cone
A cone.
coneData
A pointer to a TQ3ConeData structure.

DESCRIPTION

The Q3Cone_SetData function sets the data associated with the cone specified by the cone parameter to the data specified by the coneData parameter.

Q3Cone_EmptyData

You can use the Q3Cone_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Cone_GetData .

TQ3Status Q3Cone_EmptyData (TQ3ConeData *coneData);
coneData
A pointer to a TQ3ConeData structure.

DESCRIPTION

The Q3Cone_EmptyData function releases the memory occupied by the TQ3ConeData structure pointed to by the coneData parameter; that memory was allocated by a previous call to Q3Cone_GetData .

Q3Cone_GetOrigin

You can use the Q3Cone_GetOrigin function to get the origin of a cone.

TQ3Status Q3Cone_GetOrigin (TQ3GeometryObject cone, TQ3Point3D *origin);
cone
A cone.
origin
On exit, the origin of the specified cone.

DESCRIPTION

The Q3Cone_GetOrigin function returns, in the origin parameter, the origin of the cone specified by the cone parameter.

Q3Cone_SetOrigin

You can use the Q3Cone_SetOrigin function to set the origin of a cone.

TQ3Status Q3Cone_SetOrigin (
                     TQ3GeometryObject cone,
                     const TQ3Point3D *origin);
cone
A cone.
origin
The desired origin of the specified cone.

DESCRIPTION

The Q3Cone_SetOrigin function sets the origin of the cone specified by the cone parameter to that specified in the origin parameter.

Q3Cone_GetOrientation

You can use the Q3Cone_GetOrientation function to get the orientation of a cone.

TQ3Status Q3Cone_GetOrientation (
                     TQ3GeometryObject cone,
                     TQ3Vector3D *orientation);
cone
A cone.
orientation
On exit, the orientation of the specified cone.

DESCRIPTION

The Q3Cone_GetOrientation function returns, in the orientation parameter, the orientation of the cone specified by the cone parameter.

Q3Cone_SetOrientation

You can use the Q3Cone_SetOrientation function to set the orientation of a cone.

TQ3Status Q3Cone_SetOrientation (
                     TQ3GeometryObject cone,
                     const TQ3Vector3D *orientation);
cone
A cone.
orientation
The desired orientation of the specified cone.

DESCRIPTION

The Q3Cone_SetOrientation function sets the orientation of the cone specified by the cone parameter to that specified in the orientation parameter.

Q3Cone_GetMajorRadius

You can use the Q3Cone_GetMajorRadius function to get the major radius of a cone.

TQ3Status Q3Cone_GetMajorRadius (
                     TQ3GeometryObject cone,
                     TQ3Vector3D *majorRadius);
cone
A cone.
majorRadius
On exit, the major radius of the specified cone.

DESCRIPTION

The Q3Cone_GetMajorRadius function returns, in the majorRadius parameter, the major radius of the cone specified by the cone parameter.

Q3Cone_SetMajorRadius

You can use the Q3Cone_SetMajorRadius function to set the major radius of a cone.

TQ3Status Q3Cone_SetMajorRadius (
                     TQ3GeometryObject cone,
                     const TQ3Vector3D *majorRadius);
cone
A cone.
majorRadius
The desired major radius of the specified cone.

DESCRIPTION

The Q3Cone_SetMajorRadius function sets the major radius of the cone specified by the cone parameter to that specified in the majorRadius parameter.

Q3Cone_GetMinorRadius

You can use the Q3Cone_GetMinorRadius function to get the minor radius of a cone.

TQ3Status Q3Cone_GetMinorRadius (
                     TQ3GeometryObject cone,
                     TQ3Vector3D *minorRadius);
cone
A cone.
minorRadius
On exit, the minor radius of the specified cone.

DESCRIPTION

The Q3Cone_GetMinorRadius function returns, in the minorRadius parameter, the minor radius of the cone specified by the cone parameter.

Q3Cone_SetMinorRadius

You can use the Q3Cone_SetMinorRadius function to set the minor radius of a cone.

TQ3Status Q3Cone_SetMinorRadius (
                     TQ3GeometryObject cone,
                     const TQ3Vector3D *minorRadius);
cone
A cone.
minorRadius
The desired minor radius of the specified cone.

DESCRIPTION

The Q3Cone_SetMinorRadius function sets the minor radius of the cone specified by the cone parameter to that specified in the minorRadius parameter.

Q3Cone_GetCaps

You can use the Q3Cone_GetCaps function to get the cap style of a cone.

TQ3Status Q3Cone_GetCaps (TQ3GeometryObject cone, TQ3EndCap *caps);
cone
A cone.
caps
On exit, the cap style of the specified cone.

DESCRIPTION

The Q3Cone_GetCaps function returns, in the caps parameter, the current cap style of the cone specified by the cone parameter.

Q3Cone_SetCaps

You can use the Q3Cone_SetCaps function to set the cap style of a cone.

TQ3Status Q3Cone_SetCaps (TQ3GeometryObject cone, TQ3EndCap caps);
cone
A cone.
caps
The desired style of cone cap.

DESCRIPTION

The Q3Cone_SetCaps function sets the cap of the cone specified by the cone parameter to the style indicated by the caps parameter.

Q3Cone_GetFaceAttributeSet

You can use the Q3Cone_GetFaceAttributeSet function to get the face attribute set of a cone.

TQ3Status Q3Cone_GetFaceAttributeSet (
                     TQ3GeometryObject cone,
                     TQ3AttributeSet *faceAttributeSet);
cone
A cone.
faceAttributeSet
On exit, the attribute set of the face of the specified cone.

DESCRIPTION

The Q3Cone_GetFaceAttributeSet function returns, in the faceAttributeSet parameter, the attribute set of the face of the cone specified by the cone parameter. The reference count of the set is incremented.

Q3Cone_SetFaceAttributeSet

You can use the Q3Cone_SetFaceAttributeSet function to set the face attribute set of a cone.

TQ3Status Q3Cone_SetFaceAttributeSet (
                     TQ3GeometryObject cone,
                     TQ3AttributeSet faceAttributeSet);
cone
A cone.
faceAttributeSet
The desired attribute set of the face of the specified cone.

DESCRIPTION

The Q3Cone_SetFaceAttributeSet function sets the attribute set of the face of the cone specified by the cone parameter to that specified in the faceAttributeSet parameter.

Q3Cone_GetBottomAttributeSet

You can use the Q3Cone_GetBottomAttributeSet function to get the bottom attribute set of a cone.

TQ3Status Q3Cone_GetBottomAttributeSet (
                     TQ3GeometryObject cone,
                     TQ3AttributeSet *bottomAttributeSet);
cone
A cone.
bottomAttributeSet
On exit, the attribute set of the bottom of the specified cone.

DESCRIPTION

The Q3Cone_GetBottomAttributeSet function returns, in the bottomAttributeSet parameter, the attribute set of the bottom of the cone specified by the cone parameter. The reference count of the set is incremented.

Q3Cone_SetBottomAttributeSet

You can use the Q3Cone_SetBottomAttributeSet function to set the bottom attribute set of a cone.

TQ3Status Q3Cone_SetBottomAttributeSet (
                     TQ3GeometryObject cone,
                     TQ3AttributeSet bottomAttributeSet);
cone
A cone.
bottomAttributeSet
The desired attribute set of the bottom of the specified cone.

DESCRIPTION

The Q3Cone_SetBottomAttributeSet function sets the attribute set of the bottom of the cone specified by the cone parameter to that specified in the bottomAttributeSet parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |